package midend.IR_Type;

public class IR_Pointer implements IR_Type{

    private IR_Type Value_Type;

    private IR_Pointer(){}

    public IR_Pointer(IR_Type param){
        this.Value_Type = param;
    }
    public IR_Type get_Base_Type(){
        return  Value_Type;
    }
    @Override
    public String get_TypeName() {
        return this.Value_Type.get_TypeName() + "*";
    }
    @Override
    public int get_Const_Type() {
        return IR_Const.IR_ConstPointer;
    }

    public void set_Base_Type(IR_Type param){
        this.Value_Type = param;
    }

    @Override
    public String toString() {
        return "IR_Pointer{" +
                "Value_Type=" + Value_Type +
                '}';
    }
}
